Device and method for defect inspection based on explainable artificial intelligence

ABSTRACT

An AI based defect inspecting device and method is disclosed. The present embodiment, in determining the good or defective product using the deep learning-based classification model based on an image of the product, provides a defect inspecting device and method for providing a basis for determining a good/defective product provided by a deep learning-based classification model using explainable AI (XAI) generating a category set for the basis, and continuously updating parameters of the deep learning-based classification model using the category set.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of Korean Patent Application No.10-2021-0033928, filed on Mar. 16, 2021 in the Korean IntellectualProperty Office, the disclosure of which is incorporated herein in itsentirety by reference.

BACKGROUND 1) FIELD

The present disclosure relates to a defect inspecting device and methodbased on explainable artificial intelligence (XAI). More particularly,in determining the good/defective product using the deep learning-basedclassification model based on an image of the product, the presentdisclosure relates to a defect inspecting device and method that providea basis for determining a good/defective product provided by a deeplearning-based classification model using explainable artificialintelligence (XAI), generate a category set for the determination basis,and continuously update parameters of the deep learning-basedclassification model using the category set.

2) DESCRIPTION OF RELATED ART

The statements in this section merely provide background informationrelated to the present disclosure and do not necessarily constituteprior art.

In comparison with a defect inspecting method using a rule-basedalgorithm, a deep learning-based defect inspecting method has anadvantage that a quality management level can be improved by performingmore sophisticated product inspection. However, when deep learningtechnology is applied to an actual process, management supervision maybe difficult over existing rule-based machine vision techniques. This isbecause the deep learning-based defect inspecting method may not presenta clear basis for determining whether a product is good/defective. Thus,when a defect occurs, it may be difficult not only to analyze a cause,but also to check whether or not an algorithm is normally operated. Thisproblem can act as a technical barrier when a deep learning-basedalgorithm is applied to an actual process despite the proven performancefor the deep learning-based algorithm.

Further, the defect inspecting method to which deep learning-basedmachine vision is applied provides only two results of good/defectivedespite the presence of various bases for determining good/defective.Parameters of the deep learning algorithm need to be updated due toenvironmental changes or the occurrence of process issues. When updateof the parameters of the deep learning algorithm does not proceed in atimely manner because only the determination results are provided, thedeep learning algorithm may cause continuous misdetermination of theproduct later on. A low nonadjusted ratio caused by the continuation ofthis misdetermination can ultimately cause serious damage in aproduction process. Therefore, in view of the utilization andmaintenance of the defect inspecting method, a solution for presentingan explainable basis for the determination result of the deep learningalgorithm, and a solution for updating the deep learning algorithm basedon the explainable basis need to be considered.

SUMMARY

The present disclosure, in determining the good/defective product usingthe deep learning-based classification model based on an image of theproduct, is directed to providing a defect inspecting device and methodfor adapting a deep learning-based classification model to anenvironmental change by providing a basis for determining agood/defective product provided by the deep learning-basedclassification model using explainable artificial intelligence (XAI), bygenerating a category set for the determination basis, and bycontinuously updating parameters of the deep learning-basedclassification model using the category set.

In accordance with one aspect of the present disclosure, provided is amethod of operating a computing device for defect inspection,comprising: acquiring an image of a product to be inspected; generatinga determination result indicating whether the product is good ordefective based on the acquired image using a deep learning-based firstclassification model, and providing a determination basis for thedetermination result, wherein the first classification model has one ormore parameters that are same as those of a second classification modelthat is pre-trained or stored in a data storage after being updated; andperforming an adaptation process on the first classification model whenthe determination basis is determined as being an abnormal value,wherein performing the adaptation process comprises: updating a categoryset including a plurality of categories for the determination basis; andtraining the first classification model using the second classificationmodel and the updated category set.

In accordance with another aspect of the present disclosure, provided isan apparatus for defect inspecting, including an input unit configuredto acquire an image of a product to be inspected; a product inspectionunit configured to generate a determination result indicating whetherthe product is good or defective based on the acquired image using adeep learning-based first classification model, and to provide adetermination basis for the determination result, wherein the firstclassification model has one or more parameters that are same as thoseof a second classification model that is pre-trained or stored in a datastorage after being updated; and an adaptation unit configured toperform an adaptation process on the first classification model when thedetermination basis is determined as being an abnormal value, whereinthe adaptation unit comprises: a category set generation unit configuredto update a category set including a plurality of categories for thedetermination basis; and a training unit configured to train the firstclassification model using the second classification model and theupdated category set.

In accordance with another aspect of the present disclosure, provided isa non-transitory computer-readable recording medium having instructionsstored thereon, wherein the instructions cause the computer to performacquiring an image of a product to be inspected; generating adetermination result indicating whether the product is good or defectivebased on the acquired image using a deep learning-based firstclassification model, and providing a determination basis for thedetermination result, wherein the first classification model has one ormore parameters that are same as those of a second classification modelthat is pre-trained or stored in a data storage after being updated; andperforming an adaptation process on the first classification model whenthe determination basis is determined as being an abnormal value,wherein performing the adaptation process comprises: updating a categoryset including a plurality of categories for the determination basis; andtraining the first classification model using the second classificationmodel and the updated category set.

As described above, according to the present embodiment, a defectinspecting device and method for providing a basis for determining agood/defective product provided by a deep learning-based classificationmodel using explainable artificial intelligence, generating a categoryset for the basis, and continuously updating parameters of the deeplearning-based classification model using the category set are provided,and thereby there is an effect that, in view of utilization andmaintenance of a deep learning algorithm, real-time adaptation to acause of a defect caused by an environmental change and a flexiblecountermeasure to a new type of defect are enabled.

Further, according to the present embodiment, a defect inspecting deviceand method for providing a basis for determining a good/defectiveproduct provided by a deep learning-based classification model usingexplainable artificial intelligence, are provided, and thereby there isan effect that new know-how associated with a production process can beaccumulated by grasping a specific potential defect element causing thebasis for determining good/defective within an image.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a conceptual block diagram of a defect inspecting deviceaccording to an embodiment of the present disclosure.

FIG. 2 is a block diagram conceptually illustrating a classificationmodel according to an embodiment of the present disclosure.

FIG. 3 is a flow chart of a defect inspecting method according to anembodiment of the present disclosure.

FIG. 4 is an exemplary diagram conceptually illustrating a latent spacematching process of a classification model according to an embodiment ofthe present disclosure.

FIG. 5 is an exemplary diagram conceptually illustrating a fine-tuningprocess for a classification model according to an embodiment of thepresent disclosure.

DETAILED DESCRIPTION

Hereinafter, some embodiments of the present disclosure will bedescribed in detail with reference to the accompanying drawings. In thefollowing description, like reference numerals preferably designate likeelements, although the elements are shown in different drawings.Further, in the following description of some embodiments, a detaileddescription of known functions and configurations incorporated thereinwill be omitted for the purpose of clarity and for brevity.

Additionally, various terms such as first, second, A, B, (a), (b), etc.,are used solely to differentiate one component from the other but not toimply or suggest the substances, order, or sequence of the components.Throughout this specification, when a part ‘includes’ or ‘comprises’ acomponent, the part is meant to further include other components, not toexclude thereof unless specifically stated to the contrary. Further, theterms such as ‘unit’, ‘module’, and the like refer to one or more unitsfor processing at least one function or operation, which may beimplemented by hardware, software, or a combination thereof.

The detailed description to be made below along with the attacheddrawings is intended to describe exemplary embodiments of the presentinvention, and is not intended to represent the only embodiments inwhich the present invention can be carried out.

The present embodiment discloses a description of an AI based defectinspecting device and method. More specifically, in determining thegood/defective product using the deep learning-based classificationmodel based on an image of the product, the present embodiment providesa defect inspecting device and method for providing a basis fordetermining a good/defective product provided by a deep learning-basedclassification model using explainable AI (XAI) generating a categoryset for the basis, and continuously updating parameters of the deeplearning-based classification model using the category set.

In the following description of the present disclosure, theclassification model represents the same deep learning-based neuralnetwork as a first classification model. Meanwhile, a secondclassification model is a neural network having the same structure asthe first classification model, and is used to back up the firstclassification model. The second classification model may also be usedin a process of updating parameters of the first classification model.

FIG. 1 is a conceptual block diagram of a defect inspecting deviceaccording to an embodiment of the present disclosure.

According to the present embodiment, a defect inspecting device 100determines whether a product is good/defective based on an image of theproduct using a deep learning-based classification model. Further, thedefect inspecting device 100 provides a basis for determining agood/defective product provided by the classification model usingexplainable AI (XAI), generates a category set for the determinationbasis, and continuously updates parameters of the classification modelusing the category set. The defect inspecting device 100 includes all orsome of an input unit 110, a product inspection unit 120, and a categoryset generation unit 130. Here, the components included in the defectinspecting device 100 according to the present embodiment are notnecessarily limited thereto. For example, the defect inspecting device100 may further include a training unit (not illustrated) forpre-training and training the classification model, or may beimplemented in a form interworking with an external training unit.

The configuration illustrated in FIG. 1 is an exemplary configurationaccording to the present embodiment, and various implementationsincluding different components or different connections betweencomponents depending on the type of input, the type of XAI-baseddetermination basis, a structure of the classification model, a categoryset generating method, etc. are possible.

The input unit 110 acquires an image of a product from a machine visioncamera. Here, the image is acquired by capturing a target product to beinspected. For example, when a printed circuit board (PCB) included inthe target product is inspected, the image is acquired by capturing thePCB. When an appearance of the target product is inspected, the imagemay be acquired by capturing the appearance of the product. Further,when the target product includes a displayer, a displayed image may becaptured by a machine vision camera.

The product inspection unit 120 generates a result of determiningwhether a product is good/defective based on the image using the deeplearning-based classification model (the first classification model).Further, the classification model generates an XAI-based determinationbasis for the determination result. The determination basis may beexpressed as an intuitively recognizable visual result. The productinspection unit 120 may provide the determination basis in the form of aheat map on an image used as an input.

As illustrated in FIG. 2, the classification model (also, the secondclassification model) includes an encoder 210, a fully-connected layer220, and XAI 230. Here, the encoder 210 performs a function ofextracting a feature map from an image of a product, and may beimplemented using, for example, a convolutional neural network (CNN)which is a neural network known to be suitable for image processing.Hereinafter, the feature map extracted and finally output by the encoder210 is represented as a latent vector.

The fully-connected layer 220 generates a result of determining whethera product is good/defective based on the latent vector that is theoutput of the encoder 210.

Meanwhile, the XAI 230 generates a determination basis corresponding tothe determination result using the latent vector. The XAI 230 is analgorithm having fixed parameters. As such XAI algorithms, a responsemap-based class activation mapping (CAM) and attention branch network(ABN) algorithm, and saliency mask-based gradient-weighted CAM (GradCAM)and GradCAM++ algorithms may be used.

The training unit according to the present embodiment pre-trains thesecond classification model using seen data for learning and acorresponding target determination result. Here, the seen datarepresents an image that is previously secured for pre-training.

The training unit defines a loss function based on a distance between adetermination result inferred by the second classification model basedon the seen data and a target determination result, and performspre-training by updating parameters of the second classification modeltoward a direction in which the loss function is reduced. Here, thedistance, such as an L1 metric and an L2 metric, may be any one that canrepresent a distance difference between two comparison objects.

Meanwhile, in the pre-training process, the training unit may updateparameters of all the components (the encoder 210 and thefully-connected layer 220) of the second classification model.

After the pre-training of the second classification model is completed,the category set generation unit 130 initializes the category set byclassifying the heat maps those are the determination basis generatedfrom the seen data by the second classification model and generating aplurality of categories for the results of determining good/defective. Ak-means, a k-nearest neighbors (kNN), a Gaussian mixture model (GMM), orthe like may be used as a categorizing algorithm for categorizing thedetermination basis. The categorizing algorithm may performcategorization on the determination basis by grouping similardetermination bases into a group based on similarity among thedetermination bases. Here, a Euclidean distance, a Mahalanobis distance,a density function, etc. may be used as the similarity.

The category set may be represented as a sum of sets that are a set ofthe categories corresponding to the result of determining good and a setof the categories corresponding to the result of determining defective.The category set includes a representative heat map (or a representativevector) for each of the included categories. The representative heatmaps may be differently generated depending on the categorizingalgorithm and similarity used to categorize the determination basis.

The product inspection unit 120 copies the parameters of the secondclassification model, which is pre-trained or stored in a data storageafter being updated, to a classification model, and then performsinspection of a defect using the classification model.

When an abnormal value occurs in the determination basis, the productinspection unit 120 transmits the corresponding determination basis anddetermination result to the category set generation unit 130. Here, whena difference in similarity between an arbitrary determination basis andthe representative heat map for each of the categories included in eachcategory set is greater than a preset reference value, this arbitrarydetermination basis is expressed as an abnormal value.

Meanwhile, the abnormal value may occur regardless of whether thedetermination result is good or defective.

When the abnormal value occurs in the determination basis, the categoryset generation unit 130 may update the category set by classifying theabnormal value as a new determination basis. The updated category setmay be used to check the occurrence of an abnormal value among thedetermination bases in a subsequent defect inspection process for thenext product.

The category set generation unit 130 classifies an image, which causesthe classification model to generate an abnormal value and thecorresponding determination result, as unseen data. Further, thecategory set generation unit 130 may include the determination resultcorresponding to the abnormal value in a target determination result fortraining, and thereby update the target determination result. Thecategory set generation unit 130 provides the unseen data, the updatedtarget determination result, and the like to the training unit.

The training unit may perform training on the classification model using(i) the stored seen data and second classification model, and (ii) theunseen data and the updated target determination result. The trainingprocess for the classification model will be described below.

FIG. 3 is a flow chart of a defect inspecting method according to anembodiment of the present disclosure.

The defect inspecting device 100 acquires an image of a product to beinspected (S300).

The defect inspecting device 100 generates a result of determiningwhether the product is good/defective based on the image using theclassification model, and provides an XAI-based determination basis forthe determination result (S302). Here, the classification model isgenerated by copying parameters of the pre-trained second classificationmodel. Alternatively, the classification model has the same parametersas the second classification model stored in a data storage after beingupdated. As described above, the training unit of the defect inspectingdevice 100 may perform pre-training on the second classification modelbased on the seen data for learning and the corresponding targetdetermination result.

The defect inspecting device 100 determines whether or not thedetermination basis of the product is an abnormal value using thecategory set (S304). Here, when a difference in similarity between anarbitrary determination basis and the representative heat map for eachof categories included in the category set is greater than a presetreference value, this arbitrary determination basis is expressed as anabnormal value.

When the determination basis is not an abnormal value, the inspectionprocess for the product is terminated, and a defect inspection for thenext product can be continued.

When the determination basis is an abnormal value, the defect inspectingdevice 100 performs an adaptation process on the classification model.

In another embodiment of the present disclosure, when a preset number ormore of products having an abnormal value is accumulated, the adaptationprocess for the classification model may be performed.

The adaptation processes for the classification model (S306 and S308)are as follows.

The defect inspecting device 100 updates a category set (S306). Thedefect inspecting device 100 can update the category set by classifyingan abnormal value as a new determination basis. The updated category setmay be used to check the occurrence of the abnormal value among thedetermination bases in a subsequent defect inspection process for thenext product.

The defect inspecting device 100 classifies an image, which causes theclassification model to generate an abnormal value and the correspondingdetermination result, as unseen data. Further, the defect device 100 canupdate the target determination result by including a good/defectivedetermination result, which corresponds to the abnormal value, in thetarget determination result for training. The defect inspecting device100 provides the unseen data, the updated target determination result,and the like to the training unit.

As described above, according to the present embodiment, the defectinspecting device 100 updates the existing category set instead ofgenerating a new category set with respect to the occurrence of theabnormal value, and thereby there is an effect that the defectinspecting device can operate continuously without interruption of thedefect inspection process caused by the generation of new data.

The defect inspecting device 100 trains a classification model using thesecond classification model and the updated category set (S308).

The training process for the classification model includes a latentspace matching process (S320) and a fine-tuning process (S322) for theclassification model.

The fine-tuning process for the classification model is a process ofadapting the classification model to unseen data. Depending on theapplication of the fine-tuning process using the unseen data, a latentvector generated by the encoder 210 of the classification model based onseen data may be affected. The latent space matching process may beperformed to reduce this effect. Further, when it is possible tosuppress an influence on the latent vector, it is not necessary to givevariability to the fully-connected layer 220. Accordingly, in thetraining process for the classification model, parameters of the encoder210 may be updated while the fully-connected layer 220 inside theclassification model is still fixed.

FIG. 4 is an exemplary diagram conceptually illustrating a latent spacematching process for a classification model according to an embodimentof the present disclosure.

In the latent space matching process, the training unit of the defectinspecting device 100 trains the classification model for seen data Sosuch that the latent vectors generated by both the classification modeland the second classification model have mutual consistency. Based on adifference between a determination basis z₁ generated by theclassification model using the seen data and a determination basis z₂generated by the second classification model using the same seen data,the training unit defines a loss function L_(match)(z₁, z₂). Thetraining unit may update the parameters of the encoder 210 inside theclassification model toward a direction in which the loss functionL_(match) is reduced. As described above, the parameters of thefully-connected layer 220 inside the classification model are stillfixed.

FIG. 5 is an exemplary diagram conceptually illustrating a fine-tuningprocess for a classification model according to an embodiment of thepresent disclosure.

In the fine-tuning process, based on a difference between adetermination result (y1) generated by the classification model usingthe unseen data (Si) and a corresponding target determination result(y^(t)), the training unit defines a loss function L_(class) (y₁,y^(t)). The training unit may update the parameters of the encoder 210inside the classification model toward a direction in which the lossfunction L_(class) is reduced. As described above, the parameters of thefully-connected layer 220 inside the classification model are stillfixed.

The defect inspecting device 100 checks whether or not the performanceof the classification model satisfies preset reference performance(S324). Here, the fact that the performance of the classification modelsatisfies the preset reference performance indicates, for example, thatthe loss function L_(match) is reduced below a preset first referencevalue, and the loss function L_(class) is reduced below a preset secondreference value.

When the performance of the classification model does not satisfy thepreset reference performance, the defect inspecting device 100repeatedly performs training processes (S320 and S322) on theclassification model.

When the performance of the classification model satisfies the presetreference performance, the defect inspecting device 100 copiesparameters of the classification model to the second classificationmodel, and includes the unseen data in the seen data (S310). The defectinspecting device 100 stores the second classification model, andupdates the seen data, thereby terminating the training of theclassification model.

A device (not illustrated) in which the defect inspecting device 100according to the present embodiment is installed may be a programmablecomputer, and includes at least one communication interface connectablewith a server (not illustrated).

The training for the classification model as described above can beperformed in the device in which the defect inspecting device 100 isinstalled using the computing power of the device in which the defectinspecting device is installed. Alternatively, the training for theclassification model may be performed at the server.

As described above, according to the present embodiment, by providingthe defect inspecting device and method for providing a basis fordetermining a good/defective product provided by a deep learning-basedclassification model using explainable artificial intelligence, there isan effect that real-time adaptation to a cause of the defect caused byan environmental change, and a flexible countermeasure to a new type ofdefect are possible in view of utilization and maintenance of a deeplearning algorithm.

Each flow chart according to the present embodiment is described asperforming the processes in order, but it is not necessarily limitedthereto. In other words, the flow chart is not limited to a time-seriesorder, because it may be possible to change and perform the processesdescribed in the flowchart or perform one or more processes in parallel.

Various embodiments of the systems and techniques described herein maybe realized by a digital electronic circuit, an integrated circuit, afield programmable gate array (FPGA), an application specific integratedcircuit (ASIC), computer hardware, firmware, software, and/orcombinations thereof. These various embodiments may include beingimplemented by one or more computer programs executable on aprogrammable system. A programmable system includes at least oneprogrammable processor (which may be a special purpose processor or ageneral purpose processor) coupled to receive data and commands from astorage system, at least one input device, and at least one outputdevice and to transmit data and commands thereto. The computer programs(also known as programs, software, software applications, or code)include instructions for the programmable processor, and are stored in a“computer-readable recording medium”.

The computer-readable recording medium includes all kinds of recordingdevices in which data capable of being read by the computer system isstored. This computer-readable recording medium may be a non-volatile ornon-transitory medium such as a ROM, a CD-ROM, a magnetic tape, a floppydisk, a memory card, a hard disk, a magneto-optical disk, or a storagedevice. Further, the computer-readable recording medium may bedistributed in the computer system connected by a network, so that thecomputer-readable code can be stored and executed in a distributed mode.

Although exemplary embodiments of the present disclosure have beendescribed for illustrative purposes, those skilled in the art willappreciate that various modifications, additions, and substitutions arepossible, without departing from the idea and scope of the claimedinvention. Therefore, exemplary embodiments of the present disclosurehave been described for the sake of brevity and clarity. The scope ofthe technical idea of the present embodiments is not limited by theillustrations. Accordingly, one of ordinary skill would understand thescope of the claimed invention is not to be limited by the aboveexplicitly described embodiments but by the claims and equivalentsthereof.

What is claimed is:
 1. A method of operating a computing device fordefect inspection, comprising: acquiring an image of a product to beinspected; generating, using a deep learning-based first classificationmodel, a determination result indicating whether the product is good ordefective based on the acquired image; providing a determination basisfor the determination result, wherein the first classification model hasone or more parameters that are the same as those of a secondclassification model that is pre-trained or stored in a data storageafter being updated; and performing an adaptation process on the firstclassification model when the determination basis is determined as beingan abnormal value, wherein performing the adaptation process comprises:updating a category set including a plurality of categories for thedetermination basis; and training the first classification model usingthe second classification model and the updated category set.
 2. Themethod of claim 1, wherein: the second classification model ispre-trained using seen data for training and a corresponding targetdetermination result, and the category set is initialized by classifyingthe plurality of categories for the determination basis generated by thesecond classification model using the seen data.
 3. The method of claim1, wherein the determination basis is determined as being the abnormalvalue when a difference between the determination basis and arepresentative value of each category included in the category set isgreater than a preset reference value.
 4. The method of claim 2, whereinupdating the category set comprises: classifying, as unseen data, animage causing the first classification model to generate the abnormalvalue and the corresponding determination result; and causing thedetermination result corresponding to the abnormal value to be includedin the corresponding target determination result.
 5. The method of claim4, wherein training the first classification model comprises: performinga latent space matching using the seen data; and performing afine-tuning using the unseen data, wherein the latent space matching andfine-tuning are repeatedly performed on the first classification modeluntil the performance of the first classification model satisfies apreset reference performance.
 6. The method of claim 5, whereinperforming the latent space matching includes updating the one or moreparameters of the first classification model to reduce a first lossfunction, the first loss function being defined based on a differencebetween the determination basis generated by the first classificationmodel using the seen data and the determination basis generated by thesecond classification model using the seen data.
 7. The method of claim5, wherein performing the fine-tuning comprises updating the one or moreparameters of the first classification model to reduce a second lossfunction, the second loss function being defined based on a differencebetween the determination result generated by the first classificationmodel using the unseen data and the corresponding target determinationresult.
 8. The method of claim 5, wherein training the firstclassification model comprises: copying the one or more parameters ofthe first classification model to the second classification model toupdate the second classification model; and causing the unseen data tobe included in the seen data when the performance of the firstclassification model satisfies the preset reference performance.
 9. Asystem for inspecting a defect, comprising: an input unit configured toacquire an image of a product to be inspected; a product inspection unitconfigured to generate, using a deep learning-based first classificationmodel, a determination result indicating whether the product is good ordefective based on the acquired image, and to provide a determinationbasis for the determination result, wherein the first classificationmodel has one or more parameters that are same as those of a secondclassification model that is pre-trained or stored in a data storageafter being updated; and an adaptation unit configured to perform anadaptation process on the first classification model when thedetermination basis is determined as being an abnormal value, whereinthe adaptation unit comprises: a category set generation unit configuredto update a category set including a plurality of categories for thedetermination basis; and a training unit configured to train the firstclassification model using the second classification model and theupdated category set.
 10. The system of claim 9, wherein: each of thefirst classification model and the second classification model includesan encoder, explainable artificial intelligence (XAI), and afully-connected layer, the encoder is configured to generate a latentvector from the image, the XAI is configured to generate thedetermination basis from the latent vector, and the fully-connectedlayer is configured to generate the determination result from the latentvector.
 11. The system of claim 9, wherein the training unit isconfigured to perform a pre-training on the second classification modelusing seen data for training and a corresponding target determinationresult.
 12. The system of claim 11, wherein the category set generationunit is configured to initialize the category set by classifying theplurality of categories for the determination basis generated by thesecond classification model using the seen data used for performing thepre-training.
 13. A non-transitory computer-readable recording mediumstoring instructions that, when executed by a processor, cause aprocessor to control a system to perform: acquiring an image of aproduct to be inspected; generating, using a deep learning-based firstclassification model, a determination result indicating whether theproduct is good or defective based on the acquired image; providing adetermination basis for the determination result, wherein the firstclassification model has one or more parameters that are same as thoseof a second classification model that is pre-trained or stored in a datastorage after being updated; and performing an adaptation process on thefirst classification model when the determination basis is determined asbeing an abnormal value, wherein performing the adaptation processcomprises: updating a category set including a plurality of categoriesfor the determination basis; and training the first classification modelusing the second classification model and the updated category set.